﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcTest.Models.Board>"  ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Write
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Write</h2>

   
        <form name="frmWrite" action="/Board/BoardProcess" method="post" onsubmit="return _onSubmit();" >
        <fieldset>
            <div class="editor-label">
               글쓴이
            </div>
            <div class="editor-field">
                <input type="text" id="wr_name" name="wr_name" value="" />
            </div>
            <div class="editor-label">
               패스워드
            </div>
            <div class="editor-field">
                <input type="password" id="wr_password" name="wr_password" value="" />
            </div>
            
            <div class="editor-label">
               제목
            </div>
            <div class="editor-field">
                <input type="text" id="wr_subject" name="wr_subject" value="" />
            </div>
            <div class="editor-label">
               내용
            </div>
            <div class="editor-field">
                <textarea rows="" cols="" id="wr_content" name="wr_content" style="width:725px; height:300px; " ></textarea>
            </div>
            
           
            <p>
                <input type="image" src="/Content/images/btn_write.gif"  />
            </p>
        </fieldset>

    </form>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

    <script language="javascript" type="text/javascript">
    /*
        var oEditors = [];
        nhn.husky.EZCreator.createInIFrame({
            oAppRef: oEditors,
            elPlaceHolder: "wr_content",
            sSkinURI: "/se/SEditorSkin.html",
            fCreator: "createSEditorInIFrame"
        });
        */
        // 복수개의 에디터를 생성하고자 할 경우, 아래와 같은 방식으로 호출하고 oEditors.getById["ir2"]이나 oEditors[1]을 이용해 접근하면 됩니다.
        /*
        nhn.husky.EZCreator.createInIFrame({
        oAppRef: oEditors,
        elPlaceHolder: "ir2",
        sSkinURI: "SEditorSkin.html",
        fCreator: "createSEditorInIFrame"
        });
        */

        function pasteHTMLDemo() {
            sHTML = "<span style='color:#FF0000'>이미지 등도 이렇게 삽입하면 됩니다.</span>";
            oEditors.getById["wr_content"].exec("PASTE_HTML", [sHTML]);
        }

        function showHTML() {
            alert(oEditors.getById["wr_content"].getIR());
        }
        /*
        function _onSubmit() {
            // 에디터의 내용을 에디터 생성시에 사용했던 textarea에 넣어 줍니다.
            oEditors.getById["wr_content"].exec("UPDATE_IR_FIELD", []);

            // 에디터의 내용에 대한 값 검증은 이곳에서 document.getElementById("ir1").value를 이용해서 처리하면 됩니다.
           
            try {
                document.frmWrite.submit();

                return false;
            } catch (e) { }
        }
        */

        function _onSubmit() {
            
            try {
                document.frmWrite.submit();

                return false;
            } catch (e) { }
        }
</script>
</asp:Content>

